<!-- eslint-disable -->
<template>
  <div class="forbidden-container">
    <div class="error-content">
      <div class="error-illustration">
        <svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 24 24" fill="none" stroke="#ff4d4f" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
          <circle cx="12" cy="12" r="10"></circle>
          <line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line>
          <path d="M16 16c-1.5-1.5-3-3-4-4"></path>
        </svg>
      </div>
      <h1 class="error-title">403 Forbidden</h1>
      <p class="error-description">抱歉，您没有权限访问此页面</p>
      <div class="error-actions">
        <el-button type="primary" size="large" @click="goHome" round>
          <i class="el-icon-house"></i> 返回首页
        </el-button>
        <el-button type="default" size="large" @click="goBack" round>
          <i class="el-icon-back"></i> 返回上一页
        </el-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()

const goHome = () => {
  router.push('/')
}

const goBack = () => {
  router.go(-1)
}
</script>

<style scoped>
.forbidden-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 20px;
}

.error-content {
  text-align: center;
  max-width: 600px;
  padding: 40px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.6s ease-out;
}

.error-illustration {
  margin-bottom: 24px;
}

.error-title {
  font-size: 2.5rem;
  color: #ff4d4f;
  margin-bottom: 16px;
  font-weight: 700;
}

.error-description {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 32px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .error-content {
    padding: 24px;
  }
  
  .error-actions {
    flex-direction: column;
  }
  
  .error-title {
    font-size: 2rem;
  }
}
</style>